//
// Created by 刘洋 on 2024/4/23.
//

#ifndef USARTPACKAGE_USARTPACKED_H
#define USARTPACKAGE_USARTPACKED_H
#include "usart.h"
typedef struct __packed
{
    unsigned char head[2];
    uint8_t len;
    uint8_t cmd;
    union
    {
        uint8_t data8[4];
        float dataf;
    };
    unsigned char tail;
}DATA;
extern uint8_t rxBuffer;
extern DATA data;
void Receive(uint8_t bytedata);
void Data_Analysis(uint8_t cmd,uint8_t* data_ptr,uint8_t len);
#endif //USARTPACKAGE_USARTPACKED_H
